package org.darkforest.enums;
/**
 * 
 */
public enum StateEnum {
	offState(0 ,"失效"),
	onState(1 ,"生效");






	private int value;
	private String text;

	private StateEnum(int value, String text){
		this.value = value;
		this.text = text;
	}



	public static String getTextByValue(int value){
		for(StateEnum e : StateEnum.values()){
			if(e.value == value){
				return e.text;
			}
		}
		return null;
	}

	
	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}
	
	

}
